package com.zhanglu.fun.services.chatroom.robot;

import com.zhanglu.fun.services.chatroom.bean.ResultResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhanglu
 * @description 聊天机器人路由
 * @date 2017/10/30 19:22
 */
@RestController
@Slf4j
public class RobotRouter {
    @Autowired
    private RobotService robotService;

    @GetMapping("/auth/robot/answer")
    public ResultResponse getAnswer(@RequestParam("question") String question) {
        return robotService.getAnswer(question);

    }
}
